/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package admin.provider;

import admin.util.UtilEjb;
import ejb.attribute.KscEventJndi;
import ejb.bean.AbstractFacade;
import ejb.bean.EventFacade;
import ejb.entity.Event;

public class EventProvider extends WrapperProvider<Event> {

    public static EventProvider getInstance() {
        return EventProviderHolder.INSTANCE;
    }

    public EventProvider() {
        super(Event.class);
    }

    @Override
    public AbstractFacade<Event> getAbstractFacade() {
        return getEventFacade();
    }

    private EventFacade getEventFacade() {
        return UtilEjb.getInstance().<EventFacade>getEJB(KscEventJndi.EVENT_BEAN);
    }

    private static class EventProviderHolder {

        private static final EventProvider INSTANCE = new EventProvider();

        private EventProviderHolder() {
        }
    }
}
